- frontpage_fragment_cache("grid_item", listing) do
  .home-fluid-thumbnail-grid-item
    %div
      -# Listing image
      = render :partial => "layouts/grid_item_listing_image", :locals => {:listing => listing, :modifier_class => ""}

      -# Listing author details
      .home-fluid-thumbnail-grid-author
        .home-fluid-thumbnail-grid-author-avatar
          = link_to(person_path(username: listing.author.username)) do
            = image_tag(listing.author.avatar.thumb || missing_avatar(:thumb), :class => "home-fluid-thumbnail-grid-author-avatar-image")

        - distance = Maybe(listing.distance).or_else(nil)
        - name = PersonViewUtils.person_entity_display_name(listing.author, @current_community.name_display_type)
        - if(!show_distance || distance.blank?)
          = link_to(person_path(username: listing.author.username), :class => "home-fluid-thumbnail-grid-author-name", title: name) do
            = name
        - else
          .home-fluid-thumbnail-grid-details
            = link_to(person_path(username: listing.author.username), class: "home-fluid-thumbnail-grid-details-author-name", title: name) do
              = name
            - dist = format_distance(distance)
            - dist_string = "#{dist} #{listing.distance_unit}"
            .home-fluid-thumbnail-grid-details-distance{title: dist_string}
              = dist_string
